Leetcode Counting Bits | Dynamic Programming | Python